<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<shield:permssion type="button">
<table class="tab-list shield-table-odd">
    <tr>
        <th class="w50 taCenter">序号</th>
        <th class="w100">姓名</th>
	    <th>标题</th>
	    <th class="w100">开始日期</th>
	    <th class="w100">结束日期</th>
	    <th class="w100">总工时</th>
        <th class="operate_icon">操作</th>
    </tr>
<c:forEach var="model" items="${pageBean.resultList }" varStatus="var">
    <tr>
        <td style="text-align: center;">${(pageBean.currentPage -1)*pageBean.pageSize+var.count }</td>
        <td title="${model.createName }">${model.createName }</td>
	   	<td title="${model.title }">${model.title }</td>
	   	<td title="${model.startDate }"><fmt:formatDate value="${model.startDate }" pattern="yyyy-MM-dd"/></td>
	   	<td title="${model.endDate }"><fmt:formatDate value="${model.endDate }" pattern="yyyy-MM-dd"/></td>
	   	<td title="${model.totalHours }">
	   	<c:if test="${not empty model.totalHours}">
	   		${model.totalHours }小时
	   	</c:if>
	   	<c:if test="${empty model.totalHours}">
	   		0小时
	   	</c:if>
	   	</td>
	
        <td>
        	<!-- href改为data-url -->
            <a data-url="${ctxPathA }/oa/work/monthlyReport/show" shieldParams="{'id':'${model.id }'}" class="shieldDialog shield-icon show" viewTitle="工作月报详情" data-icon-title="查看工作月报详情"
               viewWidth="1000"></a>
            <c:if test="${model.createBy eq sessionScope.userId }">
            <a data-url="${ctxPathA }/oa/work/monthlyReport/toAddOrUpdate" shieldParams="{'id':'${model.id }'}"  class="shieldDialog shield-icon update" viewTitle="修改工作月报" data-icon-title="修改工作月报"
               viewWidth="1000"></a>
            <a data-url="${ctxPathA }/oa/work/monthlyReport/del" shieldParams="{'id':'${model.id }'}"  class="shieldAjax shield-icon del" viewTitle="确定要删除该条记录吗?"></a>
            </c:if>
        </td>
    </tr>
</c:forEach>
<c:if test="${empty pageBean.resultList }">
    <!-- 无数据时展示，有数据时展示上面的列表, nodatatr_plugin自动处理列合并数-->
    <tr class="nodatatr_plugin">
        <td colspan="5" class="taCenter">暂无数据</td>
    </tr>
</c:if>
</table>
</shield:permssion>
<%@include file="/WEB-INF/view/a/include/pagination.jsp"%>